import Vue from "vue";
import VueRouter from "vue-router";

import MusicHall from "../components/musicHall/MusicHall";
import Page from "../components/musicHall/page/Page";
import Songer from "../components/musicHall/songer/Songer";
import Album from "../components/musicHall/album/Album";
import MV from "../components/musicHall/mv/MV";
import SongSheet from "../components/musicHall/songSheet/SongSheet";
import RankingList from "../components/musicHall/rankingList/RankingList";

import MyMusic from "../components/myMusic/MyMusic";
import Musician from "../components/musician/Musician";
import VIP from "../components/vip/VIP";
import Search from "../components/search/Search";
import SongListDetail from "../components/commons/details/SongListDetails";
import MVDetail from "../components/commons/details/MVDetails";
import UserInfo from "../components/User/UserInfo";
import SongerDetails from "../components/commons/details/SongerDetails";
import UserDetails from "../components/commons/details/UserDetails";
import AlbumDetails from "../components/commons/details/AlbumDetails";
import SongDetails from "../components/commons/details/SongDetails";

Vue.use(VueRouter);

export default new VueRouter({
  routes: [
    {
      path: "/",
      redirect: "/MusicHall",
    },
    {
      path: "/MusicHall",
      component: MusicHall,
      children: [
        {
          path: "",
          redirect: "Page",
        },
        {
          path: "Page",
          component: Page,
        },
        {
          path: "Songer",
          component: Songer,
        },
        {
          path: "Album",
          component: Album,
        },
        {
          path: "MV",
          component: MV,
        },
        {
          path: "SongSheet",
          component: SongSheet,
        },
        {
          path: "RankingList",
          component: RankingList,
        },
      ],
    },
    {
      path: "/MyMusic",
      component: MyMusic,
    },
    {
      path: "/Musician",
      component: Musician,
    },
    {
      path: "/VIP",
      component: VIP,
    },
    {
      path: "/Search",
      component: Search,
    },
    {
      path: "/SongListDetail/:id",
      name: "SongListDetail",
      component: SongListDetail,
    },
    {
      path: "/MVDetail/:id",
      name: "MVDetail",
      component: MVDetail,
    },
    {
      path: "/UserInfo",
      component: UserInfo,
    },
    {
      path: "/SongerDetails/:id",
      name: "SongerDetails",
      component: SongerDetails,
    },
    {
      path: "/UserDetails/:id",
      name: "UserDetails",
      component: UserDetails,
    },
    {
      path: "/AlbumDetails/:id",
      name: "AlbumDetails",
      component: AlbumDetails,
    },
    {
      path: "/SongDetails/:id",
      name: "SongDetails",
      component: SongDetails,
    },
  ],
});
